var MongoClient = require('mongodb').MongoClient;
var url = 'mongodb://localhost:27017/';


MongoClient.connect(url, function (err, db) {
    if (err) throw err;
    console.log('数据库已创建');
    var dbase = db.db("mongo");
    // dbase.collection('ids').updateOne({name:'user'},{$set:{id:0}},function(err,res){
    //     if (err) throw err;
    //     console.log("文档更新成功");
    // })
    dbase.collection('member').drop(function (err, res) {
        if (err) throw err;
        if(res) console.log("清空集合!");
        db.close();
    });
});